#pragma GCC optimize(3)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>
#include <set>

using namespace std;
using LL = long long;
using PII = pair<LL, int>;

const int N = 60, M = 110;
int k;
LL f[N];
LL sum[N];
LL C[M];
/*
    a > fi = f[i-1]+f[i-2] > f[i-1]+f[i-3]+f[i-4] > f[i-1]+f[i-3]+f[i-5]......+f[1]
*/

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);

    f[1] = 1;
    f[2] = 1;
    for(int i = 3; i <= 55; i ++) f[i] = f[i - 1] + f[i - 2];
    for(int i = 1; i <= 55; i ++) sum[i] = sum[i - 1] + f[i];

    int T;
    scanf("%d", &T);
    while(T--){
        multiset<array<LL, 2>> mu;
        LL sumv = 0;
        
        scanf("%d", &k);
        for(int i = 1; i <= k; i ++){
            scanf("%d", &C[i]);
            mu.insert({C[i], (LL)1e9});
            sumv += C[i];
        }

        int index = 0;
        bool flag = true;
        for(int i = 0; i < 55; i ++){
            if(sum[i] == sumv){
                index = i;
                break;
            }
        }

        if(index == 0){
            cout << "NO" << endl;
            continue;
        }

        for(int i = index; i >= 1; i --){
            auto temp = --mu.end();
          if((*temp)[0] < f[i] || (*temp)[1] == i + 1 ){
                printf("NO\n");
                flag = false;
                break;
            }

            LL val = (*temp)[0];
            val -= f[i];
            mu.erase(--mu.end());
            mu.insert({val, i});
        }

        if(flag) printf("YES\n");
 

    }


    return 0;
}